using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using SchoolsBI;
using System.Xml;

public partial class Profesores_Resumen : System.Web.UI.Page
{
    static Periodos per;
   
    protected void Page_Load(object sender, EventArgs e)
    {
        CursoSeleccion1.tipo = TipoSeleccion.Periodos;
        CursoSeleccion1.seleciona += new CursoSelected(CursoSeleccion1_seleciona);
        CursoSeleccion1.clear += new Clear(CursoSeleccion1_clear);
        barbutton.Style["display"] = "none";

        
    }

    void CursoSeleccion1_clear()
    {
       
    }

    void CursoSeleccion1_seleciona(Periodos Periodo)
    {
        per = Periodo;
        ShowListaAlumnos();
       
    }

    
    void ShowListaAlumnos() {

       
            
                if (per != null)
                {
                    ShowXmlData(biFactory.IdCurso, 2008);
                }
                else
                {
                    ShowMsgWeb("Falta Seleccionar Algo");
                }
            
       

    }

    private void ShowMsgWeb(string p)
    {
        lblMensajes.Text = p;
    }
    
    private void ShowXmlData(Int32 idCurso, Int32 Anio) {

        XmlDataAlumnos xdalumnos = new XmlDataAlumnos();
        biFactory.Per = per;

        XmlDocument osource = xdalumnos.getDataNota(idCurso,biFactory.IdMateria, per,true);

        Xml1.Document = osource;
        
        Xml1.TransformSource = biFactory.PlanillaXSL(tipoPlanilla.Resumen);
        Xml1.Visible = true;

        trCargaMasiva.Style["display"] = "";
        barbutton.Style["display"] = "";

        

    }
    string Redondear(double value) {
        return Convert.ToString(Math.Abs(value));
    }
    protected void cmdGuardar_Click(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        ShowListaAlumnos();
    }
}
